<?php use_helper('Form')?>
<?php include_partial('contact_tabs',array('iden'=>$iden,'tab_select'=>2,))?>
<?php
  if($accountOwnerForm->isNew()){
    $save_url = 'contact/insertAccountOwner';
    $reset_url = 'contact/showAccountOwner';
?>
    <div class="form_title">New Owner Account</div>
<?php
  }else{
    $save_url = 'contact/updateAccountOwner';
    $reset_url = 'contact/showAccountOwner';
?>
    <div class="form_title">Edit Owner Account</div>
<?php
  }
?>
<?php echo form_tag($save_url)?>
<?php echo input_hidden_tag('tab',3)?>
<div class="infobox1">
  <?php $accountOwnerForm->renderGlobalErrors() ?>
  <?php if ($accountOwnerForm->hasErrors()): ?>
    <ul class="error_list">
      <li>Form has errors
    </ul>
  <?php endif;?>
  <?php include_partial('owner_fields',array('accountOwnerForm'=>$accountOwnerForm))?>
</div>
<?php 
  include_partial(
    'account_buttons',
    array(
      'save_url'=>$save_url,
      'delete_url'=>'contact/deleteAccountOwner?contact_iden='.$accountOwnerForm->getObject()->getContactIden(),
      'reset_url'=>$reset_url,
      'form_type'=>'owner account',
      'list_name'=>$list_name,
      'new'=>$accountOwnerForm->isNew(),
    )
  )
?>
</form>